<template>
    <div>
        <!-- 轮播图区域 -->
        <mt-swipe :auto="1000">
            <mt-swipe-item v-for="(item,i) in slideShow" :key="i">
                <img :src="item.img">
            </mt-swipe-item>            
        </mt-swipe>
        <!-- 轮播图区域结束 -->

        <!-- 九宫格布局开始 -->
        <ul class="mui-table-view mui-grid-view mui-grid-9">
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><router-link to="/homePage/newList">
                            <img src="http://localhost:8080/src/images/menu1.png" alt="">
		                    <div class="mui-media-body">新闻资讯</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><router-link to="/homePage/shareImg">
		                    <img src="http://localhost:8080/src/images/menu2.png" alt="">
		                    <div class="mui-media-body">图片分享</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <img src="http://localhost:8080/src/images/menu3.png" alt="">
		                    <div class="mui-media-body">商品购买</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <img src="http://localhost:8080/src/images/menu4.png" alt="">
		                    <div class="mui-media-body">留言反馈</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <img src="http://localhost:8080/src/images/menu5.png" alt="">
		                    <div class="mui-media-body">视频专区</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <img src="http://localhost:8080/src/images/menu6.png" alt="">
		                    <div class="mui-media-body">联系我们</div></a></li>
		        </ul> 
        <!-- 九宫格布局结束 -->

    </div>
</template>

<script>
export default {
    data(){
        return {
            slideShow:[]
        }
    },
    created(){
        this.getSlideShow() 
    },
    methods:{
        async getSlideShow(){
           let result = await this.$http.get('/api/slideShow');
            //console.log(result);
            // console.log(this.slideShow);
            this.slideShow = result.data.message
            // console.log(result.data.message);
        }
    },
    filters:{

    },
    directives:{

    },
    props:[]
}
</script>

<style lang="less" scoped>
    .mint-swipe {
        height: 180px;
        img {
            width: 100%;
            height: 100%;
        }
        .mint-swipe-item {
            &:nth-child(1) {
                background: red;
            }
            &:nth-child(2) {
                background: green;
            }
            &:nth-child(3) {
                background: blue;
            }
        }
    }

    .mui-grid-view {
        li {
            img {
            width: 60px;
            height:60px;
        }
        }
    }

    .mui-grid-view.mui-grid-9 {
        background: #fff;
        .mui-table-view-cell {
            border-right: 0;
            border-bottom: 0;
        }
    }
</style>